package com.xcjh.smartchat.net

import okhttp3.Interceptor
import okhttp3.Response
import java.io.IOException

/**
 * 自定义头部参数拦截器，传入heads
 */
class MyHeadInterceptor : Interceptor {

    @Throws(IOException::class)
    override fun intercept(chain: Interceptor.Chain): Response {
        val builder = chain.request().newBuilder()
        //  builder.addHeader("token", "token123456").build()
        builder.addHeader("device", "Android").build()
       // builder.addHeader("content-language", "zht_CN").build()
      //  builder.addHeader(LocalData.TOEKN, LocalData.token ?: "").build()
        //builder.addHeader("isLogin", CacheUtil.isLogin().toString()).build()
        return chain.proceed(builder.build())
    }

}